<?php include_once './application/views/sys_admin/common/header.php';  ?>
<div class=" definewidth m20">
	<form  method="post" id="zhs_letterForm" name="zhs_letterForm">
		<table class="table table-bordered table-hover m10">
			<tr>
		        <td class="tableleft">发件人 </td>
		        <td><input type="text" name="sendname" id="sendname"  value="<?php echo $admin['adminname'];?>" /> </td>
		    </tr>
		    <tr>
		        <td class="tableleft">站内信模板 </td>
		        <td>
		        	<select  id="msgtemplet" name="templet_id" onchange="templetContent(3);">
							<option value="0">--请选择站内信模板--</option>
							<?php foreach($msgtemplets as $k=>$v){?>
								<option value="<?php echo $k;?>"><?php echo $v;?></option>
							<?php }?>
						</select>
				</td>
		    </tr>
		    <tr>
		        <td class="tableleft">收件人 </td>
		        <td> <input type="text" name="collectname" id="collectname" value="" />
					<!-- <textarea name="collectnamestr" id="collectnamestr" style="width:800px;height:75px;" ></textarea> -->
					</td>
		    </tr>
		    <tr>
		        <td class="tableleft">标题</td>
		        <td><input type="text" name="title" id="title" size="50"  value="" /></td>
		    </tr>
		    <tr>
		        <td class="tableleft">内容编辑 </td>
		        <td><textarea name="content" id="msgcontent" style="width:800px;height:200px;" ></textarea> </td>
		    </tr>
		    <tr>
		        <td class="tableleft"> </td>
		        <td> </td>
		    </tr>
		    <tr>
		        <td class="tableleft"> </td>
		        <td><button type="button" class="btn btn-success"  onclick="zhs_letterSubmit();" >提交</button></td>
		    </tr>
		</table>
	</form>
</div>
<div id="dialog" title="系统提示" style="display:none;">
	<div id="view_response"></div>
</div>
	
<script type="text/javascript">
function zhs_letterSubmit(){
	var options = {
		url : '/sys_admin/msgonline/zhs_linkslist/',
		dataType: "json",
		type:"post",
		success : function(ret) {
			alert(ret.msg);
			window.location.href ='/sys_admin/msgonline/zhs_letter/';
		}
	};
	$("#zhs_letterForm").ajaxSubmit(options);
	return false;
}
</script>
